Visual Basic (Declaration) | |
---|---|
<ExtensionAttribute()> Public Overloads Shared Function FirstOrNullEntity(Of TEntity As Class)( _ ByVal source1 As IEntityQuery(Of TEntity) _ ) As TEntity |
Visual Basic (Usage) | ![]() |
---|---|
Dim source1 As IEntityQuery(Of TEntity) Dim value As TEntity value = EntityQueryExtensions.FirstOrNullEntity(Of TEntity)(source1) |
C# | |
---|---|
[ExtensionAttribute()] public static TEntity FirstOrNullEntity<TEntity>( IEntityQuery<TEntity> source1 ) where TEntity: class |
C++/CLI | |
---|---|
[ExtensionAttribute()] public: static TEntity^ FirstOrNullEntitygeneric<typename TEntity> ( IEntityQuery<TEntity^>^ source1 ) where TEntity: ref class |
Parameters
- source1
Type Parameters
- TEntity
C# | ![]() |
---|---|
var mgr1 = new DomainModelEntityManager(); Customer cust = mgr1.Customers.Where(c => c.Country == "UK").FirstOrNullEntity(); |
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family